//
//  MGAlertViewController.m
//  Express
//
//  Created by lhongl on 2025/9/25.
//  Copyright © 2025 QM. All rights reserved.
//

#import "MGAlertViewController.h"

@interface MGAlertViewController ()

@end

@implementation MGAlertViewController

- (instancetype)init{
    if(self = [super init]){
        self.modalPresentationStyle = UIModalPresentationCustom;
        self.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
    }
    return self;
}

- (void)viewWillAppear:(BOOL)animated{
    [super viewWillAppear:animated];
    [self.view setAlpha:1.0];
}

- (void)viewWillDisappear:(BOOL)animated{
    [super viewWillDisappear:animated];
    [self.view setAlpha:0.0];
}

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.3];
    // Do any additional setup after loading the view.
}

- (void)setModalPresentationStyle:(UIModalPresentationStyle)modalPresentationStyle{
    super.modalPresentationStyle = UIModalPresentationCustom;
}


- (void)setModalTransitionStyle:(UIModalTransitionStyle)modalTransitionStyle{
    super.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
